package com.cheng.reggie.mapper;

import com.cheng.reggie.dto.DishDto;
import com.cheng.reggie.entity.Dish;
import com.cheng.reggie.entity.DishFlavor;
import org.apache.ibatis.annotations.*;

import java.util.List;

public interface DishFlavorMapper {

    //插入多条口味数据
    Integer sava(@Param("dishFlavorList") List<DishFlavor> dishFlavorList);


    @Delete("delete from  dish_flavor where dish_id=#{dishId}")
    Integer deleteByDishId(Long id);

    //根据菜品id获取口味列表数据
    @Select("select  * from dish_flavor where dish_id=#{dishId} and is_deleted=0 ")
    List<DishFlavor> findByDishId(Long dishId);
}
